<script setup>
import {useRouter } from "vue-router";

// const baseRouter = window.microApp.router.getBaseAppRouter();
const router = useRouter();

defineProps({
  statisticsObj: {
    type: Object,
    default: () => ({})
  }
});

const handelDetail = (data, funcTab) => {
  router.push({
    path: "/project-payment"
  });
};
</script>

<template>
  <div class="receive-payment">
    <div class="receive-payment__msg">
      <svg-icon icon-class="receive_payment" size="24" />
      <div class="receive-payment__msg__content">
        收款总览：共{{ statisticsObj.abnormalCollection ?? 0 }}个工程存在异常收款，总计异常收款{{
          statisticsObj.abnormalCollectionAmount ?? 0
        }}元。本月剩余应收款{{ statisticsObj.receivableAmount ?? 0 }}元
      </div>
    </div>
    <el-button type="primary" link @click="handelDetail(statisticsObj, 'paymentPlan')">查看收款计划</el-button>
  </div>
</template>

<style scoped lang="scss">
@import "receivePayment";
</style>
